<div class="order-list-page" ng-if="pagedata.op == 'main'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">我的参与</div>
		<div class="fui-header-right"></div>
	</div>
	<div style="margin-top:58px"></div>
	<div id="tab" class="fui-tab fui-tab-danger">
        	<a ng-class="{'external active':pagedata.status == 100}" href="javascript:" ng-click="pagedata.status = 100;tool.get_list('jy_creditchange/order/getlist/',true)">全部</a>
			<a ng-class="{'external active':pagedata.status == 0}" ng-click="pagedata.status = 0;tool.get_list('jy_creditchange/order/getlist/status=0',true)">待支付</a>
			<a ng-class="{'external active':pagedata.status == 1}" ng-click="pagedata.status = 1;tool.get_list('jy_creditchange/order/getlist/status=1',true)">待竞付</a>
			<a ng-class="{'external active':pagedata.status == 2}" ng-click="pagedata.status=2;tool.get_list('jy_creditchange/order/getlist/status=2',true)">竞拍成功</a>
			<a ng-class="{'external active':pagedata.status==3}" ng-click="pagedata.status=3;tool.get_list('jy_creditchange/order/getlist/status=3',true)">竞拍失败</a>

    </div>
	<div class='fui-content order-list' style="margin-top:4.5rem">
	<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
                <a class="fui-list external" style="padding: 0.42rem 0.5rem" data-nocache="true">
                    <div class="fui-list-inner">
                        <div class="subtitle"> 竞拍号: {{item.ordersn}}</div>
                    </div>
                    <div class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
                    <div class="angle"></div>
                </a> 
                    <a href="" class="external">
                        <div class="fui-list goods-list">
                            <div class="fui-list-media" style="">
                                <img class="" ng-src="{{tomedia(item.goods.image) || '../core/resource/images/nopic.jpg'}}">
                            </div>
                            <div class="fui-list-inner">
                                <div class="text goodstitle towline">{{item.goods.title || '名称'}}</div>
                            </div>
                            <div class="fui-list-angle" style="width:3rem">
                                ￥<span class="marketprice">{{item.goods.price}}</span></div>
                        </div>
                    </a>
                <div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.55rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.50rem"></i> {{item.createtime}}</span>
                    <span class="status noremark">出价: <span class="text-danger">￥{{item.fee}}</span></span>
                </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-show="item.status == 0" class="btn btn-sm btn-default-o order-delete" href="javascript:" ng-click="post({},'jy_creditchange/order/del','id='+item.id)">删除订单</div>
					<div ng-show="item.status == 0" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="pagedata.payaddprice(item.id)">支付订单</div>
				</span>
            </div>
        </div>
	</div>
	<div class="content-empty" ng-show="pagedata.list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有参与记录！</p>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.payaddprice=function(id){
	scope.post_json('jy_creditchange/order/pay/id='+id,{},function(pay_id){
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_creditchange/order/');
				}else{
					scope.message('支付失败！','success','jy_creditchange/order/');
				}
			});
	});
}
if(scope.pagedata.gopayaddpriceid>0){
	scope.pagedata.payaddprice(scope.pagedata.gopayaddpriceid);
}
scope.tool.get_list('jy_creditchange/order/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_creditchange/order/getlist/status='+scope.pagedata.status);
}
</script>